<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>班级花名册</title>
    <style>
        body {
            background-image: url('background_image.jpg');
            background-size: cover;
            font-family: Arial, sans-serif;
        }
        h1 {
            text-align: center;
            color: #fff;
            text-shadow: 2px 2px 4px #000000;
        }
        table {
            border-collapse: collapse;
            width: 50%;
            margin: 20px auto;
            background-color: #f2f2f2;
        }
        table, th, td {
            border: 1px solid black;
        }
        th, td {
            padding: 10px;
            text-align: center;
        }
        th {
            background-color: #4CAF50;
            color: white;
        }
        tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        tr:nth-child(odd) {
            background-color: #ffffff;
        }
        @font-face {
        font-family: "KaiTi";
        src: url("path/to/your/kaiti.ttf");
    }

    h1 {
        font-family: KaiTi, sans-serif;
        font-weight: normal;
        font-size: 36px;
        text-align: center;
        color: #fff;
        text-shadow: 2px 2px 4px #000000;
        background-color: #000;
        padding: 20px;
        border-radius: 10px;
    }
    </style>
</head>
<body>
    <h1>22软件一班 花名册</h1>
    <table>
        <tr>
            <th>学号</th>
            <th>姓名</th>
        </tr>
        <script>
            function generateRandomName() {
                let lastNames = ["王", "李", "张", "刘", "陈", "杨", "黄", "赵", "吴"];
                let firstNames = ["伟", "强", "芳", "明", "艳", "勇", "敏", "静", "军", "娜", "涛", "戬"];
                
                let startNumber = 2223710101;
                for (let i = 0; i < 43; i++) {
                    let randomLastName = lastNames[Math.floor(Math.random() * lastNames.length)];
                    let randomFirstName = firstNames[Math.floor(Math.random() * firstNames.length)];
                    if (Math.random() > 0.5) {
                        randomFirstName += firstNames[Math.floor(Math.random() * firstNames.length)];
                    }
                    document.write("<tr>");
                    document.write("<td>" + (startNumber + i) + "</td>");
                    document.write("<td>" + randomLastName + randomFirstName + "</td>");
                    document.write("</tr>");
                }
            }
            generateRandomName();
        </script>
    </table>
</body>
</html>
